import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listDevice(query) {
  return request({
    url: '/business/device/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】所有列表
export function listAllDevice(query) {
  return request({
    url: '/business/device/listAll',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getDevice(deviceId) {
  return request({
    url: '/business/device/getInfo/' + deviceId,
    method: 'get'
  })
}

export function getDeviceByName(deviceName) {
  return request({
    url: '/business/device/getDevice/' + deviceName,
    method: 'get'
  })
}


// 新增【请填写功能名称】
export function addDevice(data) {
  return request({
    url: '/business/device/add',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateDevice(data) {
  return request({
    url: '/business/device/edit',
    method: 'post',
    data: data
  })
}

// 删除【请填写功能名称】
export function delDevice(deviceId) {
  return request({
    url: '/business/device/remove/' + deviceId,
    method: 'get'
  })
}
